import home from '../views/home/home.vue'
import center from '../views/center/center.vue'
import UserAdd from '../views/user-manage/UserAdd.vue'
import UserList from '../views/user-manage/UserList.vue'
import NewAdd from "@/views/news-manage/newAdd.vue";
import NewsList from "@/views/news-manage/newsList.vue";
import ProductAdd from "@/views/product-manage/productAdd.vue";
import ProductList from "@/views/product-manage/productList.vue";
import NotFound from "@/views/notfound/NotFound.vue";

const routes = [
    {
        path: '/index',
        component: home,
    },
    {
        path: '/center',
        component: center,
    },
    {
        path: '/user-manage/adduser',
        component: UserAdd,
    },
    {
        path: '/user-manage/userlist',
        component: UserList,
    },
    {
        path: '/news-manage/addnews',
        component: NewAdd,
    },
    {
        path: '/news-manage/newslist',
        component: NewsList,
    },
    {
        path: '/product-manage/addProduct',
        component: ProductAdd,
    },
    {
        path: '/product-manage/ProductList',//ip:port/#/product-manage/ProductList
        component: ProductList,
    },
    {
        path:"/",
        redirect: "/index"
    },
    {
        path: "/:pathMatch(.*)*", //匹配 /xxx/xxx/xx 多级路由
        name: "NotFound",
        component: NotFound,
    }
]
export default routes;
// console.log("routes")
